package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AGoodsCategoryMapper;
import com.ruoyi.system.domain.AGoodsCategory;
import com.ruoyi.system.service.IAGoodsCategoryService;

/**
 * 商品分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-10
 */
@Service
public class AGoodsCategoryServiceImpl implements IAGoodsCategoryService 
{
    @Autowired
    private AGoodsCategoryMapper aGoodsCategoryMapper;

    /**
     * 查询商品分类
     * 
     * @param id 商品分类主键
     * @return 商品分类
     */
    @Override
    public AGoodsCategory selectAGoodsCategoryById(Long id)
    {
        return aGoodsCategoryMapper.selectAGoodsCategoryById(id);
    }

    /**
     * 查询商品分类列表
     * 
     * @param aGoodsCategory 商品分类
     * @return 商品分类
     */
    @Override
    public List<AGoodsCategory> selectAGoodsCategoryList(AGoodsCategory aGoodsCategory)
    {
        return aGoodsCategoryMapper.selectAGoodsCategoryList(aGoodsCategory);
    }

    /**
     * 新增商品分类
     * 
     * @param aGoodsCategory 商品分类
     * @return 结果
     */
    @Override
    public int insertAGoodsCategory(AGoodsCategory aGoodsCategory)
    {
        return aGoodsCategoryMapper.insertAGoodsCategory(aGoodsCategory);
    }

    /**
     * 修改商品分类
     * 
     * @param aGoodsCategory 商品分类
     * @return 结果
     */
    @Override
    public int updateAGoodsCategory(AGoodsCategory aGoodsCategory)
    {
        return aGoodsCategoryMapper.updateAGoodsCategory(aGoodsCategory);
    }

    /**
     * 批量删除商品分类
     * 
     * @param ids 需要删除的商品分类主键
     * @return 结果
     */
    @Override
    public int deleteAGoodsCategoryByIds(Long[] ids)
    {
        return aGoodsCategoryMapper.deleteAGoodsCategoryByIds(ids);
    }

    /**
     * 删除商品分类信息
     * 
     * @param id 商品分类主键
     * @return 结果
     */
    @Override
    public int deleteAGoodsCategoryById(Long id)
    {
        return aGoodsCategoryMapper.deleteAGoodsCategoryById(id);
    }
}
